package com.zlzlib.manager.config;

import com.zlzlib.common.config.CommonMvcConfig;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;

/**
 * @DateTime: 2023/6/2 10:32
 * @Author zlz
 * @Version 1.0
 */
public abstract class BaseMvcConfig extends CommonMvcConfig {

    @Override
    protected void addResourceHandlers(ResourceHandlerRegistry registry) {
        // 将url为 /** 的请求映射到 /static/ 路径下进行查找
        registry.addResourceHandler("/**")
                .addResourceLocations("classpath:/static/");
        //swagger
        registry.addResourceHandler("doc.html")
                .addResourceLocations("classpath:/META-INF/resources/");
        registry.addResourceHandler("/webjars/**")
                .addResourceLocations("classpath:/META-INF/resources/webjars/");
    }


}
